import 'package:dio/dio.dart';
import 'package:t_upgrade_plugin/network/upgrade/upgrade_header_interceptor.dart';
import 'package:t_upgrade_plugin/network/upgrade_network_config.dart';
import 'package:common/common.dart';

class UpgradeHttpClient extends THttpClient {
  static UpgradeHttpClient _instance;

  factory UpgradeHttpClient() {
    if (_instance == null) {
      _instance = UpgradeHttpClient._();
    }
    return _instance;
  }

  UpgradeHttpClient._() : super();

  @override
  List<Interceptor> get interceptors => [
    UpgradeHeaderInterceptor(),
        LoggingInterceptor(),
      ];

  @override
  NetworkConfig get networkConfig => UpgradeNetworkConfig();
}
